package cloud.daodao.storm.security.model;

import cloud.daodao.storm.common.serialize.Serializer;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import java.time.LocalDateTime;

/**
 * @author DaoDao
 */
@Getter
@Setter
@Entity
@DynamicInsert
@DynamicUpdate
@Table(schema = "storm", name = "secret_aes")
public class Aes implements Serializer {

    @Id
    @Column(name = "id")
    private String id;

    @Column(name = "aes_key")
    private String aesKey;

    @Column(name = "aes_iv")
    private String aesIv;

    @Column(name = "create_time")
    private LocalDateTime createTime;

    @Column(name = "update_time")
    private LocalDateTime updateTime;

    @Column(name = "valid")
    private Boolean valid;

}
